﻿<Window x:Class="ErikEJ.SqlCeToolbox.Dialogs.ImportDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:self="clr-namespace:ErikEJ.SqlCeToolbox"
        xmlns:Dialogs="clr-namespace:ErikEJ.SqlCeToolbox.Dialogs"
        Icon="../Resources/propes.PNG"
        Title="Import from CSV" 
        WindowStyle="SingleBorderWindow"
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize" 
        Background="#FFECECEC"
        ShowInTaskbar="False"
        mc:Ignorable="d" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        d:DesignHeight="308" 
        d:DesignWidth="342" 
        SizeToContent="WidthAndHeight">
       <Grid>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="90" />
            <ColumnDefinition Width="190" />
            <ColumnDefinition Width="5*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="60" />
            <RowDefinition Height="35" />
            <RowDefinition Height="40" />
            <RowDefinition Height="33" />
            <RowDefinition Height="47" />
            <RowDefinition Height="37*" />
        </Grid.RowDefinitions>

        <Dialogs:DialogHeader Grid.ColumnSpan="3" Text="Import from CSV" />

        <Label Margin="0,4,177,1" Grid.Row="1" Content="Filename (UTF8):" Grid.ColumnSpan="2"></Label>
        <Label Margin="0,5,14,0" Grid.Row="2" Content="Separator:"></Label>
        <Label Margin="0,5,126,0" Grid.Row="3" Content="Sample CSV format:" Grid.ColumnSpan="2"></Label>
        <TextBox Margin="10,0,2,2" IsReadOnly="True" Name="txtSample" Grid.Row="4" Grid.ColumnSpan="2" Background="Transparent" BorderBrush="Transparent" Text="test" />
        <Border Margin="5,5,5,5" CornerRadius="5" Grid.Column="1" Grid.Row="1" >
            <Border.Background>
                <LinearGradientBrush EndPoint="0,100" StartPoint="0,0" MappingMode="Absolute">
                    <GradientStop Color="#FF6E6E6E" Offset="0"/>
                    <GradientStop Color="#FFFFFFFF" Offset="0.1"/>
                </LinearGradientBrush>
            </Border.Background>
            <TextBox Name="FileName" Background="Transparent" BorderBrush="Transparent" TextChanged="FileName_TextChanged" />
        </Border>
        <StackPanel Margin="0,3,0,0" Orientation="Horizontal" HorizontalAlignment="Right" Grid.Column="1" Grid.Row="5" Width="230" Grid.ColumnSpan="2">
            <Button Name="SaveButton" IsDefault="True" Margin="10,0,2,2" Width="70" Height="30" Click="SaveButton_Click" Grid.Column="1" Grid.Row="4">Import</Button>
            <Button Name="CancelButton" IsCancel="True" Margin="10,0,2,2" Width="70" Height="30" Click="CancelButton_Click">Cancel</Button>
        </StackPanel>
        <ComboBox Grid.Column="1" Grid.Row="2" Height="24" HorizontalAlignment="Left" Margin="5,4,0,0" Name="comboBox1" VerticalAlignment="Top" Width="70" ItemsSource="{Binding}" SelectedIndex="0" SelectionChanged="comboBox1_SelectionChanged" IsEditable="True">
            <ComboBoxItem Content="," />
            <ComboBoxItem Content=";" />
        </ComboBox>
        <TextBox Name="comboText" Visibility="Hidden" Text="{Binding ElementName=comboBox1, Path=Text}" TextChanged="comboBox1_TextInput" />
           
        <Button Content=".." Grid.Column="2" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="0,6,0,0" Name="btnBrowse" VerticalAlignment="Top" Width="30" Click="btnBrowse_Click" />
    </Grid>
</Window>
